{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "b9702787-10f3-41b2-bd93-7b40d3e53383",
   "metadata": {},
   "source": [
    "# Profiling ttnn operations"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "253a1334-d62f-4cff-806e-62ce5289b580",
   "metadata": {},
   "source": [
    "See the documentation on [profiling](https://tenstorrent.github.io/tt-metal/latest/ttnn/ttnn/profiling_ttnn_operations.html) !"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "0bf212be-9b1f-4025-b82f-2ae3add8053f",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Removed all profiler artifacts\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.\n",
      "make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Writing to /home/ubuntu/.config/pip/pip.conf\n",
      "Installing python env build backend requirements...\n",
      "Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu\n",
      "Requirement already satisfied: setuptools in ./build/python_env/lib/python3.8/site-packages (44.0.0)\n",
      "Collecting wheel\n",
      "  Using cached wheel-0.42.0-py3-none-any.whl (65 kB)\n",
      "Installing collected packages: wheel\n",
      "Successfully installed wheel-0.42.0\n",
      "Installing editable dev version of tt_eager packages...\n",
      "Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu\n",
      "Obtaining file:///home/ubuntu/git/tt-metal\n",
      "  Installing build dependencies: started\n",
      "  Installing build dependencies: finished with status 'done'\n",
      "  Getting requirements to build wheel: started\n",
      "  Getting requirements to build wheel: finished with status 'done'\n",
      "    Preparing wheel metadata: started\n",
      "    Preparing wheel metadata: finished with status 'done'\n",
      "Collecting click==8.1.3\n",
      "  Using cached click-8.1.3-py3-none-any.whl (96 kB)\n",
      "Collecting loguru==0.6.0\n",
      "  Using cached loguru-0.6.0-py3-none-any.whl (58 kB)\n",
      "Collecting ipywidgets==8.1.1\n",
      "  Using cached ipywidgets-8.1.1-py3-none-any.whl (139 kB)\n",
      "Processing /home/ubuntu/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c/PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl\n",
      "Collecting jupyterlab==4.0.7\n",
      "  Using cached jupyterlab-4.0.7-py3-none-any.whl (9.2 MB)\n",
      "Collecting pyelftools==0.29\n",
      "  Using cached pyelftools-0.29-py2.py3-none-any.whl (174 kB)\n",
      "Processing /home/ubuntu/.cache/pip/wheels/45/4f/ed/863cf4386fe6db3c09333712009ec1c5146a36f3904b469d13/curtsies-0.4.1-py3-none-any.whl\n",
      "Processing /home/ubuntu/.cache/pip/wheels/91/b7/13/0c117d73912c6c2beb1eb0d7d6884f4e79e6e5b5e91eeb34f5/torchtrail-0.0.8-py3-none-any.whl\n",
      "Collecting numpy==1.20.3\n",
      "  Using cached numpy-1.20.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.4 MB)\n",
      "Collecting matplotlib==3.7.1\n",
      "  Using cached matplotlib-3.7.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.2 MB)\n",
      "Collecting toolz==0.12.0\n",
      "  Using cached toolz-0.12.0-py3-none-any.whl (55 kB)\n",
      "Collecting Pillow==9.5.0\n",
      "  Using cached Pillow-9.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)\n",
      "Collecting pandas==1.5.3\n",
      "  Using cached pandas-1.5.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)\n",
      "Collecting torch==1.13.1+cpu\n",
      "  Using cached https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp38-cp38-linux_x86_64.whl (199.1 MB)\n",
      "Collecting dash==2.8.1\n",
      "  Using cached dash-2.8.1-py3-none-any.whl (9.9 MB)\n",
      "Collecting rich==13.3.3\n",
      "  Using cached rich-13.3.3-py3-none-any.whl (238 kB)\n",
      "Collecting seaborn==0.12.2\n",
      "  Using cached seaborn-0.12.2-py3-none-any.whl (293 kB)\n",
      "Collecting plotly==5.13.0\n",
      "  Using cached plotly-5.13.0-py2.py3-none-any.whl (15.2 MB)\n",
      "Collecting traitlets>=4.3.1\n",
      "  Using cached traitlets-5.14.1-py3-none-any.whl (85 kB)\n",
      "Collecting widgetsnbextension~=4.0.9\n",
      "  Using cached widgetsnbextension-4.0.10-py3-none-any.whl (2.3 MB)\n",
      "Collecting ipython>=6.1.0\n",
      "  Using cached ipython-8.12.3-py3-none-any.whl (798 kB)\n",
      "Collecting jupyterlab-widgets~=3.0.9\n",
      "  Using cached jupyterlab_widgets-3.0.10-py3-none-any.whl (215 kB)\n",
      "Collecting comm>=0.1.3\n",
      "  Using cached comm-0.2.1-py3-none-any.whl (7.2 kB)\n",
      "Collecting async-lru>=1.0.0\n",
      "  Using cached async_lru-2.0.4-py3-none-any.whl (6.1 kB)\n",
      "Collecting tomli; python_version < \"3.11\"\n",
      "  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)\n",
      "Collecting jupyter-server<3,>=2.4.0\n",
      "  Using cached jupyter_server-2.12.5-py3-none-any.whl (380 kB)\n",
      "Collecting jinja2>=3.0.3\n",
      "  Using cached Jinja2-3.1.3-py3-none-any.whl (133 kB)\n",
      "Collecting ipykernel\n",
      "  Using cached ipykernel-6.29.2-py3-none-any.whl (116 kB)\n",
      "Collecting notebook-shim>=0.2\n",
      "  Using cached notebook_shim-0.2.3-py3-none-any.whl (13 kB)\n",
      "Collecting jupyterlab-server<3,>=2.19.0\n",
      "  Using cached jupyterlab_server-2.25.2-py3-none-any.whl (58 kB)\n",
      "Collecting jupyter-lsp>=2.0.0\n",
      "  Using cached jupyter_lsp-2.2.2-py3-none-any.whl (68 kB)\n",
      "Collecting packaging\n",
      "  Using cached packaging-23.2-py3-none-any.whl (53 kB)\n",
      "Collecting importlib-resources>=1.4; python_version < \"3.9\"\n",
      "  Using cached importlib_resources-6.1.1-py3-none-any.whl (33 kB)\n",
      "Collecting importlib-metadata>=4.8.3; python_version < \"3.10\"\n",
      "  Using cached importlib_metadata-7.0.1-py3-none-any.whl (23 kB)\n",
      "Collecting jupyter-core\n",
      "  Using cached jupyter_core-5.7.1-py3-none-any.whl (28 kB)\n",
      "Collecting tornado>=6.2.0\n",
      "  Using cached tornado-6.4-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (435 kB)\n",
      "Collecting blessed>=1.5\n",
      "  Using cached blessed-1.20.0-py2.py3-none-any.whl (58 kB)\n",
      "Collecting cwcwidth\n",
      "  Using cached cwcwidth-0.1.9-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (92 kB)\n",
      "Collecting pyrsistent==0.20.0\n",
      "  Using cached pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (121 kB)\n",
      "Collecting graphviz==0.20.1\n",
      "  Using cached graphviz-0.20.1-py3-none-any.whl (47 kB)\n",
      "Collecting networkx==3.1\n",
      "  Using cached networkx-3.1-py3-none-any.whl (2.1 MB)\n",
      "Collecting pyparsing>=2.3.1\n",
      "  Using cached pyparsing-3.1.1-py3-none-any.whl (103 kB)\n",
      "Collecting kiwisolver>=1.0.1\n",
      "  Using cached kiwisolver-1.4.5-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)\n",
      "Collecting contourpy>=1.0.1\n",
      "  Using cached contourpy-1.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301 kB)\n",
      "Collecting fonttools>=4.22.0\n",
      "  Using cached fonttools-4.48.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)\n",
      "Collecting python-dateutil>=2.7\n",
      "  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)\n",
      "Collecting cycler>=0.10\n",
      "  Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)\n",
      "Collecting pytz>=2020.1\n",
      "  Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)\n",
      "Collecting typing-extensions\n",
      "  Using cached typing_extensions-4.9.0-py3-none-any.whl (32 kB)\n",
      "Collecting dash-html-components==2.0.0\n",
      "  Using cached dash_html_components-2.0.0-py3-none-any.whl (4.1 kB)\n",
      "Collecting dash-table==5.0.0\n",
      "  Using cached dash_table-5.0.0-py3-none-any.whl (3.9 kB)\n",
      "Collecting Flask>=1.0.4\n",
      "  Using cached flask-3.0.2-py3-none-any.whl (101 kB)\n",
      "Collecting dash-core-components==2.0.0\n",
      "  Using cached dash_core_components-2.0.0-py3-none-any.whl (3.8 kB)\n",
      "Collecting pygments<3.0.0,>=2.13.0\n",
      "  Using cached pygments-2.17.2-py3-none-any.whl (1.2 MB)\n",
      "Collecting markdown-it-py<3.0.0,>=2.2.0\n",
      "  Using cached markdown_it_py-2.2.0-py3-none-any.whl (84 kB)\n",
      "Collecting tenacity>=6.2.0\n",
      "  Using cached tenacity-8.2.3-py3-none-any.whl (24 kB)\n",
      "Collecting pickleshare\n",
      "  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)\n",
      "Collecting prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30\n",
      "  Using cached prompt_toolkit-3.0.43-py3-none-any.whl (386 kB)\n",
      "Collecting stack-data\n",
      "  Using cached stack_data-0.6.3-py3-none-any.whl (24 kB)\n",
      "Collecting decorator\n",
      "  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)\n",
      "Collecting backcall\n",
      "  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)\n",
      "Collecting jedi>=0.16\n",
      "  Using cached jedi-0.19.1-py2.py3-none-any.whl (1.6 MB)\n",
      "Collecting pexpect>4.3; sys_platform != \"win32\"\n",
      "  Using cached pexpect-4.9.0-py2.py3-none-any.whl (63 kB)\n",
      "Collecting matplotlib-inline\n",
      "  Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)\n",
      "Collecting send2trash>=1.8.2\n",
      "  Using cached Send2Trash-1.8.2-py3-none-any.whl (18 kB)\n",
      "Collecting anyio>=3.1.0\n",
      "  Using cached anyio-4.2.0-py3-none-any.whl (85 kB)\n",
      "Collecting jupyter-server-terminals\n",
      "  Using cached jupyter_server_terminals-0.5.2-py3-none-any.whl (13 kB)\n",
      "Collecting jupyter-client>=7.4.4\n",
      "  Using cached jupyter_client-8.6.0-py3-none-any.whl (105 kB)\n",
      "Collecting nbformat>=5.3.0\n",
      "  Using cached nbformat-5.9.2-py3-none-any.whl (77 kB)\n",
      "Collecting overrides\n",
      "  Using cached overrides-7.7.0-py3-none-any.whl (17 kB)\n",
      "Collecting nbconvert>=6.4.4\n",
      "  Using cached nbconvert-7.16.0-py3-none-any.whl (257 kB)\n",
      "Collecting jupyter-events>=0.9.0\n",
      "  Using cached jupyter_events-0.9.0-py3-none-any.whl (18 kB)\n",
      "Collecting websocket-client\n",
      "  Using cached websocket_client-1.7.0-py3-none-any.whl (58 kB)\n",
      "Collecting pyzmq>=24\n",
      "  Using cached pyzmq-25.1.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)\n",
      "Collecting prometheus-client\n",
      "  Using cached prometheus_client-0.19.0-py3-none-any.whl (54 kB)\n",
      "Collecting argon2-cffi\n",
      "  Using cached argon2_cffi-23.1.0-py3-none-any.whl (15 kB)\n",
      "Collecting terminado>=0.8.3\n",
      "  Using cached terminado-0.18.0-py3-none-any.whl (14 kB)\n",
      "Collecting MarkupSafe>=2.0\n",
      "  Using cached MarkupSafe-2.1.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26 kB)\n",
      "Collecting nest-asyncio\n",
      "  Using cached nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB)\n",
      "Collecting psutil\n",
      "  Using cached psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (288 kB)\n",
      "Collecting debugpy>=1.6.5\n",
      "  Using cached debugpy-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)\n",
      "Collecting babel>=2.10\n",
      "  Using cached Babel-2.14.0-py3-none-any.whl (11.0 MB)\n",
      "Collecting requests>=2.31\n",
      "  Using cached requests-2.31.0-py3-none-any.whl (62 kB)\n",
      "Collecting jsonschema>=4.18.0\n",
      "  Using cached jsonschema-4.21.1-py3-none-any.whl (85 kB)\n",
      "Collecting json5>=0.9.0\n",
      "  Using cached json5-0.9.14-py2.py3-none-any.whl (19 kB)\n",
      "Collecting zipp>=3.1.0; python_version < \"3.10\"\n",
      "  Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)\n",
      "Collecting platformdirs>=2.5\n",
      "  Using cached platformdirs-4.2.0-py3-none-any.whl (17 kB)\n",
      "Collecting six>=1.9.0\n",
      "  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)\n",
      "Collecting wcwidth>=0.1.4\n",
      "  Using cached wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)\n",
      "Collecting itsdangerous>=2.1.2\n",
      "  Using cached itsdangerous-2.1.2-py3-none-any.whl (15 kB)\n",
      "Collecting blinker>=1.6.2\n",
      "  Using cached blinker-1.7.0-py3-none-any.whl (13 kB)\n",
      "Collecting Werkzeug>=3.0.0\n",
      "  Using cached werkzeug-3.0.1-py3-none-any.whl (226 kB)\n",
      "Collecting mdurl~=0.1\n",
      "  Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n",
      "Collecting pure-eval\n",
      "  Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)\n",
      "Collecting asttokens>=2.1.0\n",
      "  Using cached asttokens-2.4.1-py2.py3-none-any.whl (27 kB)\n",
      "Collecting executing>=1.2.0\n",
      "  Using cached executing-2.0.1-py2.py3-none-any.whl (24 kB)\n",
      "Collecting parso<0.9.0,>=0.8.3\n",
      "  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)\n",
      "Collecting ptyprocess>=0.5\n",
      "  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)\n",
      "Collecting exceptiongroup>=1.0.2; python_version < \"3.11\"\n",
      "  Using cached exceptiongroup-1.2.0-py3-none-any.whl (16 kB)\n",
      "Collecting idna>=2.8\n",
      "  Using cached idna-3.6-py3-none-any.whl (61 kB)\n",
      "Collecting sniffio>=1.1\n",
      "  Using cached sniffio-1.3.0-py3-none-any.whl (10 kB)\n",
      "Collecting fastjsonschema\n",
      "  Using cached fastjsonschema-2.19.1-py3-none-any.whl (23 kB)\n",
      "Collecting defusedxml\n",
      "  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)\n",
      "Collecting beautifulsoup4\n",
      "  Using cached beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)\n",
      "Collecting jupyterlab-pygments\n",
      "  Using cached jupyterlab_pygments-0.3.0-py3-none-any.whl (15 kB)\n",
      "Collecting pandocfilters>=1.4.1\n",
      "  Using cached pandocfilters-1.5.1-py2.py3-none-any.whl (8.7 kB)\n",
      "Collecting mistune<4,>=2.0.3\n",
      "  Using cached mistune-3.0.2-py3-none-any.whl (47 kB)\n",
      "Collecting tinycss2\n",
      "  Using cached tinycss2-1.2.1-py3-none-any.whl (21 kB)\n",
      "Collecting bleach!=5.0.0\n",
      "  Using cached bleach-6.1.0-py3-none-any.whl (162 kB)\n",
      "Collecting nbclient>=0.5.0\n",
      "  Using cached nbclient-0.9.0-py3-none-any.whl (24 kB)\n",
      "Collecting rfc3986-validator>=0.1.1\n",
      "  Using cached rfc3986_validator-0.1.1-py2.py3-none-any.whl (4.2 kB)\n",
      "Collecting python-json-logger>=2.0.4\n",
      "  Using cached python_json_logger-2.0.7-py3-none-any.whl (8.1 kB)\n",
      "Collecting referencing\n",
      "  Using cached referencing-0.33.0-py3-none-any.whl (26 kB)\n",
      "Collecting rfc3339-validator\n",
      "  Using cached rfc3339_validator-0.1.4-py2.py3-none-any.whl (3.5 kB)\n",
      "Collecting argon2-cffi-bindings\n",
      "  Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)\n",
      "Collecting urllib3<3,>=1.21.1\n",
      "  Using cached urllib3-2.2.0-py3-none-any.whl (120 kB)\n",
      "Collecting charset-normalizer<4,>=2\n",
      "  Using cached charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)\n",
      "Collecting certifi>=2017.4.17\n",
      "  Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)\n",
      "Collecting jsonschema-specifications>=2023.03.6\n",
      "  Using cached jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB)\n",
      "Collecting pkgutil-resolve-name>=1.3.10; python_version < \"3.9\"\n",
      "  Using cached pkgutil_resolve_name-1.3.10-py3-none-any.whl (4.7 kB)\n",
      "Collecting attrs>=22.2.0\n",
      "  Using cached attrs-23.2.0-py3-none-any.whl (60 kB)\n",
      "Collecting rpds-py>=0.7.1\n",
      "  Using cached rpds_py-0.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)\n",
      "Collecting soupsieve>1.2\n",
      "  Using cached soupsieve-2.5-py3-none-any.whl (36 kB)\n",
      "Collecting webencodings>=0.4\n",
      "  Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)\n",
      "Collecting cffi>=1.0.1\n",
      "  Using cached cffi-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (444 kB)\n",
      "Collecting pycparser\n",
      "  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)\n",
      "Installing collected packages: click, loguru, traitlets, widgetsnbextension, pygments, pickleshare, wcwidth, prompt-toolkit, pure-eval, six, asttokens, executing, stack-data, typing-extensions, decorator, backcall, parso, jedi, ptyprocess, pexpect, matplotlib-inline, ipython, jupyterlab-widgets, comm, ipywidgets, pyyaml, async-lru, tomli, send2trash, exceptiongroup, idna, sniffio, anyio, tornado, terminado, jupyter-server-terminals, pyzmq, platformdirs, jupyter-core, zipp, importlib-metadata, python-dateutil, jupyter-client, fastjsonschema, importlib-resources, rpds-py, attrs, referencing, jsonschema-specifications, pkgutil-resolve-name, jsonschema, nbformat, overrides, packaging, defusedxml, soupsieve, beautifulsoup4, jupyterlab-pygments, pandocfilters, mistune, webencodings, tinycss2, MarkupSafe, bleach, jinja2, nbclient, nbconvert, rfc3986-validator, python-json-logger, rfc3339-validator, jupyter-events, websocket-client, prometheus-client, pycparser, cffi, argon2-cffi-bindings, argon2-cffi, jupyter-server, nest-asyncio, psutil, debugpy, ipykernel, notebook-shim, pytz, babel, urllib3, charset-normalizer, certifi, requests, json5, jupyterlab-server, jupyter-lsp, jupyterlab, pyelftools, blessed, cwcwidth, curtsies, pyrsistent, graphviz, networkx, torch, torchtrail, numpy, pyparsing, kiwisolver, contourpy, fonttools, cycler, Pillow, matplotlib, toolz, pandas, dash-html-components, tenacity, plotly, dash-table, itsdangerous, blinker, Werkzeug, Flask, dash-core-components, dash, mdurl, markdown-it-py, rich, seaborn, metal-libs\n",
      "  Running setup.py develop for metal-libs\n",
      "Successfully installed Flask-3.0.2 MarkupSafe-2.1.5 Pillow-9.5.0 Werkzeug-3.0.1 anyio-4.2.0 argon2-cffi-23.1.0 argon2-cffi-bindings-21.2.0 asttokens-2.4.1 async-lru-2.0.4 attrs-23.2.0 babel-2.14.0 backcall-0.2.0 beautifulsoup4-4.12.3 bleach-6.1.0 blessed-1.20.0 blinker-1.7.0 certifi-2024.2.2 cffi-1.16.0 charset-normalizer-3.3.2 click-8.1.3 comm-0.2.1 contourpy-1.1.1 curtsies-0.4.1 cwcwidth-0.1.9 cycler-0.12.1 dash-2.8.1 dash-core-components-2.0.0 dash-html-components-2.0.0 dash-table-5.0.0 debugpy-1.8.1 decorator-5.1.1 defusedxml-0.7.1 exceptiongroup-1.2.0 executing-2.0.1 fastjsonschema-2.19.1 fonttools-4.48.1 graphviz-0.20.1 idna-3.6 importlib-metadata-7.0.1 importlib-resources-6.1.1 ipykernel-6.29.2 ipython-8.12.3 ipywidgets-8.1.1 itsdangerous-2.1.2 jedi-0.19.1 jinja2-3.1.3 json5-0.9.14 jsonschema-4.21.1 jsonschema-specifications-2023.12.1 jupyter-client-8.6.0 jupyter-core-5.7.1 jupyter-events-0.9.0 jupyter-lsp-2.2.2 jupyter-server-2.12.5 jupyter-server-terminals-0.5.2 jupyterlab-4.0.7 jupyterlab-pygments-0.3.0 jupyterlab-server-2.25.2 jupyterlab-widgets-3.0.10 kiwisolver-1.4.5 loguru-0.6.0 markdown-it-py-2.2.0 matplotlib-3.7.1 matplotlib-inline-0.1.6 mdurl-0.1.2 metal-libs mistune-3.0.2 nbclient-0.9.0 nbconvert-7.16.0 nbformat-5.9.2 nest-asyncio-1.6.0 networkx-3.1 notebook-shim-0.2.3 numpy-1.20.3 overrides-7.7.0 packaging-23.2 pandas-1.5.3 pandocfilters-1.5.1 parso-0.8.3 pexpect-4.9.0 pickleshare-0.7.5 pkgutil-resolve-name-1.3.10 platformdirs-4.2.0 plotly-5.13.0 prometheus-client-0.19.0 prompt-toolkit-3.0.43 psutil-5.9.8 ptyprocess-0.7.0 pure-eval-0.2.2 pycparser-2.21 pyelftools-0.29 pygments-2.17.2 pyparsing-3.1.1 pyrsistent-0.20.0 python-dateutil-2.8.2 python-json-logger-2.0.7 pytz-2024.1 pyyaml-5.3.1 pyzmq-25.1.2 referencing-0.33.0 requests-2.31.0 rfc3339-validator-0.1.4 rfc3986-validator-0.1.1 rich-13.3.3 rpds-py-0.17.1 seaborn-0.12.2 send2trash-1.8.2 six-1.16.0 sniffio-1.3.0 soupsieve-2.5 stack-data-0.6.3 tenacity-8.2.3 terminado-0.18.0 tinycss2-1.2.1 tomli-2.0.1 toolz-0.12.0 torch-1.13.1+cpu torchtrail-0.0.8 tornado-6.4 traitlets-5.14.1 typing-extensions-4.9.0 urllib3-2.2.0 wcwidth-0.2.13 webencodings-0.5.1 websocket-client-1.7.0 widgetsnbextension-4.0.10 zipp-3.17.0\n",
      "Installing dev environment packages...\n",
      "Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu\n",
      "Collecting platformdirs<4.0.0\n",
      "  Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)\n",
      "Collecting pre-commit==3.0.4\n",
      "  Using cached pre_commit-3.0.4-py2.py3-none-any.whl (202 kB)\n",
      "Collecting black==23.10.1\n",
      "  Using cached black-23.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)\n",
      "Collecting build==0.10.0\n",
      "  Using cached build-0.10.0-py3-none-any.whl (17 kB)\n",
      "Collecting twine==4.0.2\n",
      "  Using cached twine-4.0.2-py3-none-any.whl (36 kB)\n",
      "Collecting yamllint==1.32.0\n",
      "  Using cached yamllint-1.32.0-py3-none-any.whl (65 kB)\n",
      "Collecting docutils==0.18.1\n",
      "  Using cached docutils-0.18.1-py2.py3-none-any.whl (570 kB)\n",
      "Collecting sphinx==7.1.2\n",
      "  Using cached sphinx-7.1.2-py3-none-any.whl (3.2 MB)\n",
      "Collecting sphinx-rtd-theme==1.3.0\n",
      "  Using cached sphinx_rtd_theme-1.3.0-py2.py3-none-any.whl (2.8 MB)\n",
      "Collecting sphinxcontrib-email==0.3.5\n",
      "  Using cached sphinxcontrib_email-0.3.5-py3-none-any.whl (6.3 kB)\n",
      "Collecting lxml==4.9.4\n",
      "  Using cached lxml-4.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.1 MB)\n",
      "Collecting breathe==4.35.0\n",
      "  Using cached breathe-4.35.0-py3-none-any.whl (92 kB)\n",
      "Collecting nbsphinx==0.9.3\n",
      "  Using cached nbsphinx-0.9.3-py3-none-any.whl (31 kB)\n",
      "Collecting sphinxcontrib-jquery==4.1\n",
      "  Using cached sphinxcontrib_jquery-4.1-py2.py3-none-any.whl (121 kB)\n",
      "Requirement already satisfied: ipython==8.12.3 in ./build/python_env/lib/python3.8/site-packages (from -r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (8.12.3)\n",
      "Processing /home/ubuntu/.cache/pip/wheels/90/3a/a8/3237a93e3a6261bd24edabf3277ca59f64c1710b3d8c7c72a0/pandoc-2.3-py3-none-any.whl\n",
      "Collecting pytest==7.2.2\n",
      "  Using cached pytest-7.2.2-py3-none-any.whl (317 kB)\n",
      "Collecting pytest-timeout==2.2.0\n",
      "  Using cached pytest_timeout-2.2.0-py3-none-any.whl (13 kB)\n",
      "Processing /home/ubuntu/.cache/pip/wheels/6c/40/1d/5706d21e6b4dff52e7af12bff9ca126a3f15beb4dff386aa29/jsbeautifier-1.14.7-py3-none-any.whl\n",
      "Collecting datasets==2.9.0\n",
      "  Using cached datasets-2.9.0-py3-none-any.whl (462 kB)\n",
      "Collecting torchvision==0.14.1+cpu\n",
      "  Using cached https://download.pytorch.org/whl/cpu/torchvision-0.14.1%2Bcpu-cp38-cp38-linux_x86_64.whl (16.8 MB)\n",
      "Collecting transformers==4.28.1\n",
      "  Using cached transformers-4.28.1-py3-none-any.whl (7.0 MB)\n",
      "Collecting xlsxwriter==3.0.8\n",
      "  Using cached XlsxWriter-3.0.8-py3-none-any.whl (152 kB)\n",
      "Collecting tiktoken==0.3.3\n",
      "  Using cached tiktoken-0.3.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)\n",
      "Collecting tqdm==4.65.0\n",
      "  Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)\n",
      "Collecting sentencepiece==0.1.97\n",
      "  Using cached sentencepiece-0.1.97-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
      "Collecting numba==0.56.4\n",
      "  Using cached numba-0.56.4-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB)\n",
      "Collecting librosa==0.10.0\n",
      "  Using cached librosa-0.10.0-py3-none-any.whl (252 kB)\n",
      "Collecting timm==0.6.13\n",
      "  Using cached timm-0.6.13-py3-none-any.whl (549 kB)\n",
      "Collecting opencv-python-headless==4.8.0.74\n",
      "  Using cached opencv_python_headless-4.8.0.74-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (49.1 MB)\n",
      "Collecting diffusers==0.12.1\n",
      "  Using cached diffusers-0.12.1-py3-none-any.whl (604 kB)\n",
      "Collecting accelerate==0.19.0\n",
      "  Using cached accelerate-0.19.0-py3-none-any.whl (219 kB)\n",
      "Collecting ftfy==6.1.1\n",
      "  Using cached ftfy-6.1.1-py3-none-any.whl (53 kB)\n",
      "Collecting gitpython==3.1.32\n",
      "  Using cached GitPython-3.1.32-py3-none-any.whl (188 kB)\n",
      "Collecting einops==0.6.1\n",
      "  Using cached einops-0.6.1-py3-none-any.whl (42 kB)\n",
      "Collecting multiprocess==0.70.14\n",
      "  Using cached multiprocess-0.70.14-py38-none-any.whl (132 kB)\n",
      "Collecting evaluate==0.4.0\n",
      "  Using cached evaluate-0.4.0-py3-none-any.whl (81 kB)\n",
      "Collecting bert-score==0.3.12\n",
      "  Using cached bert_score-0.3.12-py3-none-any.whl (60 kB)\n",
      "Collecting fsspec==2023.9.2\n",
      "  Using cached fsspec-2023.9.2-py3-none-any.whl (173 kB)\n",
      "Collecting nodeenv>=0.11.1\n",
      "  Using cached nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)\n",
      "Collecting cfgv>=2.0.0\n",
      "  Using cached cfgv-3.4.0-py2.py3-none-any.whl (7.2 kB)\n",
      "Collecting identify>=1.0.0\n",
      "  Using cached identify-2.5.33-py2.py3-none-any.whl (98 kB)\n",
      "Collecting virtualenv>=20.10.0\n",
      "  Using cached virtualenv-20.25.0-py3-none-any.whl (3.8 MB)\n",
      "Requirement already satisfied: pyyaml>=5.1 in ./build/python_env/lib/python3.8/site-packages (from pre-commit==3.0.4->-r tt_metal/python_env/requirements-dev.txt (line 9)) (5.3.1)\n",
      "Requirement already satisfied: packaging>=22.0 in ./build/python_env/lib/python3.8/site-packages (from black==23.10.1->-r tt_metal/python_env/requirements-dev.txt (line 10)) (23.2)\n",
      "Collecting pathspec>=0.9.0\n",
      "  Using cached pathspec-0.12.1-py3-none-any.whl (31 kB)\n",
      "Requirement already satisfied: click>=8.0.0 in ./build/python_env/lib/python3.8/site-packages (from black==23.10.1->-r tt_metal/python_env/requirements-dev.txt (line 10)) (8.1.3)\n",
      "Requirement already satisfied: typing-extensions>=4.0.1; python_version < \"3.11\" in ./build/python_env/lib/python3.8/site-packages (from black==23.10.1->-r tt_metal/python_env/requirements-dev.txt (line 10)) (4.9.0)\n",
      "Requirement already satisfied: tomli>=1.1.0; python_version < \"3.11\" in ./build/python_env/lib/python3.8/site-packages (from black==23.10.1->-r tt_metal/python_env/requirements-dev.txt (line 10)) (2.0.1)\n",
      "Collecting mypy-extensions>=0.4.3\n",
      "  Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n",
      "Collecting pyproject_hooks\n",
      "  Using cached pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)\n",
      "Collecting readme-renderer>=35.0\n",
      "  Using cached readme_renderer-42.0-py3-none-any.whl (13 kB)\n",
      "Requirement already satisfied: rich>=12.0.0 in ./build/python_env/lib/python3.8/site-packages (from twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (13.3.3)\n",
      "Requirement already satisfied: requests>=2.20 in ./build/python_env/lib/python3.8/site-packages (from twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (2.31.0)\n",
      "Requirement already satisfied: importlib-metadata>=3.6 in ./build/python_env/lib/python3.8/site-packages (from twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (7.0.1)\n",
      "Collecting pkginfo>=1.8.1\n",
      "  Using cached pkginfo-1.9.6-py3-none-any.whl (30 kB)\n",
      "Collecting requests-toolbelt!=0.9.0,>=0.8.0\n",
      "  Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)\n",
      "Requirement already satisfied: urllib3>=1.26.0 in ./build/python_env/lib/python3.8/site-packages (from twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (2.2.0)\n",
      "Collecting keyring>=15.1\n",
      "  Using cached keyring-24.3.0-py3-none-any.whl (38 kB)\n",
      "Collecting rfc3986>=1.4.0\n",
      "  Using cached rfc3986-2.0.0-py2.py3-none-any.whl (31 kB)\n",
      "Collecting imagesize>=1.3\n",
      "  Using cached imagesize-1.4.1-py2.py3-none-any.whl (8.8 kB)\n",
      "Collecting sphinxcontrib-serializinghtml>=1.1.5\n",
      "  Using cached sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl (94 kB)\n",
      "Collecting sphinxcontrib-jsmath\n",
      "  Using cached sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl (5.1 kB)\n",
      "Collecting snowballstemmer>=2.0\n",
      "  Using cached snowballstemmer-2.2.0-py2.py3-none-any.whl (93 kB)\n",
      "Requirement already satisfied: babel>=2.9 in ./build/python_env/lib/python3.8/site-packages (from sphinx==7.1.2->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 2)) (2.14.0)\n",
      "Collecting sphinxcontrib-htmlhelp>=2.0.0\n",
      "  Using cached sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl (99 kB)\n",
      "Requirement already satisfied: Pygments>=2.13 in ./build/python_env/lib/python3.8/site-packages (from sphinx==7.1.2->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 2)) (2.17.2)\n",
      "Collecting alabaster<0.8,>=0.7\n",
      "  Using cached alabaster-0.7.13-py3-none-any.whl (13 kB)\n",
      "Collecting sphinxcontrib-applehelp\n",
      "  Using cached sphinxcontrib_applehelp-1.0.4-py3-none-any.whl (120 kB)\n",
      "Requirement already satisfied: Jinja2>=3.0 in ./build/python_env/lib/python3.8/site-packages (from sphinx==7.1.2->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 2)) (3.1.3)\n",
      "Collecting sphinxcontrib-devhelp\n",
      "  Using cached sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl (84 kB)\n",
      "Collecting sphinxcontrib-qthelp\n",
      "  Using cached sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl (90 kB)\n",
      "Requirement already satisfied: traitlets>=5 in ./build/python_env/lib/python3.8/site-packages (from nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (5.14.1)\n",
      "Requirement already satisfied: nbconvert!=5.4 in ./build/python_env/lib/python3.8/site-packages (from nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (7.16.0)\n",
      "Requirement already satisfied: nbformat in ./build/python_env/lib/python3.8/site-packages (from nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (5.9.2)\n",
      "Requirement already satisfied: backcall in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.2.0)\n",
      "Requirement already satisfied: prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (3.0.43)\n",
      "Requirement already satisfied: pickleshare in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.7.5)\n",
      "Requirement already satisfied: jedi>=0.16 in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.19.1)\n",
      "Requirement already satisfied: decorator in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (5.1.1)\n",
      "Requirement already satisfied: stack-data in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.6.3)\n",
      "Requirement already satisfied: pexpect>4.3; sys_platform != \"win32\" in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (4.9.0)\n",
      "Requirement already satisfied: matplotlib-inline in ./build/python_env/lib/python3.8/site-packages (from ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.1.6)\n",
      "Collecting ply\n",
      "  Using cached ply-3.11-py2.py3-none-any.whl (49 kB)\n",
      "Collecting plumbum\n",
      "  Using cached plumbum-1.8.2-py3-none-any.whl (127 kB)\n",
      "Collecting iniconfig\n",
      "  Using cached iniconfig-2.0.0-py3-none-any.whl (5.9 kB)\n",
      "Requirement already satisfied: attrs>=19.2.0 in ./build/python_env/lib/python3.8/site-packages (from pytest==7.2.2->-r tt_metal/python_env/requirements-dev.txt (line 19)) (23.2.0)\n",
      "Collecting pluggy<2.0,>=0.12\n",
      "  Using cached pluggy-1.4.0-py3-none-any.whl (20 kB)\n",
      "Requirement already satisfied: exceptiongroup>=1.0.0rc8; python_version < \"3.11\" in ./build/python_env/lib/python3.8/site-packages (from pytest==7.2.2->-r tt_metal/python_env/requirements-dev.txt (line 19)) (1.2.0)\n",
      "Collecting editorconfig>=0.12.2\n",
      "  Using cached EditorConfig-0.12.3-py3-none-any.whl (16 kB)\n",
      "Requirement already satisfied: six>=1.13.0 in ./build/python_env/lib/python3.8/site-packages (from jsbeautifier==1.14.7->-r tt_metal/python_env/requirements-dev.txt (line 21)) (1.16.0)\n",
      "Collecting responses<0.19\n",
      "  Using cached responses-0.18.0-py3-none-any.whl (38 kB)\n",
      "Collecting pyarrow>=6.0.0\n",
      "  Using cached pyarrow-15.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.5 MB)\n",
      "Collecting xxhash\n",
      "  Using cached xxhash-3.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
      "Collecting huggingface-hub<1.0.0,>=0.2.0\n",
      "  Using cached huggingface_hub-0.20.3-py3-none-any.whl (330 kB)\n",
      "Requirement already satisfied: pandas in ./build/python_env/lib/python3.8/site-packages (from datasets==2.9.0->-r tt_metal/python_env/requirements-dev.txt (line 22)) (1.5.3)\n",
      "Requirement already satisfied: numpy>=1.17 in ./build/python_env/lib/python3.8/site-packages (from datasets==2.9.0->-r tt_metal/python_env/requirements-dev.txt (line 22)) (1.20.3)\n",
      "Collecting aiohttp\n",
      "  Using cached aiohttp-3.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
      "Collecting dill<0.3.7\n",
      "  Using cached dill-0.3.6-py3-none-any.whl (110 kB)\n",
      "Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in ./build/python_env/lib/python3.8/site-packages (from torchvision==0.14.1+cpu->-r tt_metal/python_env/requirements-dev.txt (line 23)) (9.5.0)\n",
      "Requirement already satisfied: torch==1.13.1 in ./build/python_env/lib/python3.8/site-packages (from torchvision==0.14.1+cpu->-r tt_metal/python_env/requirements-dev.txt (line 23)) (1.13.1+cpu)\n",
      "Collecting tokenizers!=0.11.3,<0.14,>=0.11.1\n",
      "  Using cached tokenizers-0.13.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.8 MB)\n",
      "Collecting regex!=2019.12.17\n",
      "  Using cached regex-2023.12.25-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (777 kB)\n",
      "Collecting filelock\n",
      "  Using cached filelock-3.13.1-py3-none-any.whl (11 kB)\n",
      "Collecting llvmlite<0.40,>=0.39.0dev0\n",
      "  Using cached llvmlite-0.39.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB)\n",
      "Requirement already satisfied: setuptools in ./build/python_env/lib/python3.8/site-packages (from numba==0.56.4->-r tt_metal/python_env/requirements-dev.txt (line 29)) (44.0.0)\n",
      "Collecting soxr>=0.3.2\n",
      "  Using cached soxr-0.3.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
      "Collecting soundfile>=0.12.1\n",
      "  Using cached soundfile-0.12.1-py2.py3-none-any.whl (24 kB)\n",
      "Collecting pooch>=1.0\n",
      "  Using cached pooch-1.8.0-py3-none-any.whl (62 kB)\n",
      "Collecting lazy-loader>=0.1\n",
      "  Using cached lazy_loader-0.3-py3-none-any.whl (9.1 kB)\n",
      "Collecting scipy>=1.2.0\n",
      "  Using cached scipy-1.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)\n",
      "Collecting joblib>=0.14\n",
      "  Using cached joblib-1.3.2-py3-none-any.whl (302 kB)\n",
      "Collecting audioread>=2.1.9\n",
      "  Using cached audioread-3.0.1-py3-none-any.whl (23 kB)\n",
      "Collecting scikit-learn>=0.20.0\n",
      "  Using cached scikit_learn-1.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.1 MB)\n",
      "Collecting msgpack>=1.0\n",
      "  Using cached msgpack-1.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (534 kB)\n",
      "Requirement already satisfied: psutil in ./build/python_env/lib/python3.8/site-packages (from accelerate==0.19.0->-r tt_metal/python_env/requirements-dev.txt (line 34)) (5.9.8)\n",
      "Requirement already satisfied: wcwidth>=0.2.5 in ./build/python_env/lib/python3.8/site-packages (from ftfy==6.1.1->-r tt_metal/python_env/requirements-dev.txt (line 35)) (0.2.13)\n",
      "Collecting gitdb<5,>=4.0.1\n",
      "  Using cached gitdb-4.0.11-py3-none-any.whl (62 kB)\n",
      "Requirement already satisfied: matplotlib in ./build/python_env/lib/python3.8/site-packages (from bert-score==0.3.12->-r tt_metal/python_env/requirements-dev.txt (line 43)) (3.7.1)\n",
      "Collecting distlib<1,>=0.3.7\n",
      "  Using cached distlib-0.3.8-py2.py3-none-any.whl (468 kB)\n",
      "Collecting nh3>=0.2.14\n",
      "  Using cached nh3-0.2.15-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)\n",
      "Requirement already satisfied: markdown-it-py<3.0.0,>=2.2.0 in ./build/python_env/lib/python3.8/site-packages (from rich>=12.0.0->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (2.2.0)\n",
      "Requirement already satisfied: idna<4,>=2.5 in ./build/python_env/lib/python3.8/site-packages (from requests>=2.20->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (3.6)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in ./build/python_env/lib/python3.8/site-packages (from requests>=2.20->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (3.3.2)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in ./build/python_env/lib/python3.8/site-packages (from requests>=2.20->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (2024.2.2)\n",
      "Requirement already satisfied: zipp>=0.5 in ./build/python_env/lib/python3.8/site-packages (from importlib-metadata>=3.6->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (3.17.0)\n",
      "Requirement already satisfied: importlib-resources; python_version < \"3.9\" in ./build/python_env/lib/python3.8/site-packages (from keyring>=15.1->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (6.1.1)\n",
      "Collecting SecretStorage>=3.2; sys_platform == \"linux\"\n",
      "  Using cached SecretStorage-3.3.3-py3-none-any.whl (15 kB)\n",
      "Collecting jeepney>=0.4.2; sys_platform == \"linux\"\n",
      "  Using cached jeepney-0.8.0-py3-none-any.whl (48 kB)\n",
      "Collecting jaraco.classes\n",
      "  Using cached jaraco.classes-3.3.1-py3-none-any.whl (6.8 kB)\n",
      "Requirement already satisfied: pytz>=2015.7; python_version < \"3.9\" in ./build/python_env/lib/python3.8/site-packages (from babel>=2.9->sphinx==7.1.2->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 2)) (2024.1)\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in ./build/python_env/lib/python3.8/site-packages (from Jinja2>=3.0->sphinx==7.1.2->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 2)) (2.1.5)\n",
      "Requirement already satisfied: mistune<4,>=2.0.3 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (3.0.2)\n",
      "Requirement already satisfied: jupyterlab-pygments in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (0.3.0)\n",
      "Requirement already satisfied: tinycss2 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (1.2.1)\n",
      "Requirement already satisfied: nbclient>=0.5.0 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (0.9.0)\n",
      "Requirement already satisfied: beautifulsoup4 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (4.12.3)\n",
      "Requirement already satisfied: jupyter-core>=4.7 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (5.7.1)\n",
      "Requirement already satisfied: pandocfilters>=1.4.1 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (1.5.1)\n",
      "Requirement already satisfied: bleach!=5.0.0 in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (6.1.0)\n",
      "Requirement already satisfied: defusedxml in ./build/python_env/lib/python3.8/site-packages (from nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (0.7.1)\n",
      "Requirement already satisfied: fastjsonschema in ./build/python_env/lib/python3.8/site-packages (from nbformat->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (2.19.1)\n",
      "Requirement already satisfied: jsonschema>=2.6 in ./build/python_env/lib/python3.8/site-packages (from nbformat->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (4.21.1)\n",
      "Requirement already satisfied: parso<0.9.0,>=0.8.3 in ./build/python_env/lib/python3.8/site-packages (from jedi>=0.16->ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.8.3)\n",
      "Requirement already satisfied: pure-eval in ./build/python_env/lib/python3.8/site-packages (from stack-data->ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.2.2)\n",
      "Requirement already satisfied: asttokens>=2.1.0 in ./build/python_env/lib/python3.8/site-packages (from stack-data->ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (2.4.1)\n",
      "Requirement already satisfied: executing>=1.2.0 in ./build/python_env/lib/python3.8/site-packages (from stack-data->ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (2.0.1)\n",
      "Requirement already satisfied: ptyprocess>=0.5 in ./build/python_env/lib/python3.8/site-packages (from pexpect>4.3; sys_platform != \"win32\"->ipython==8.12.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 9)) (0.7.0)\n",
      "Requirement already satisfied: python-dateutil>=2.8.1 in ./build/python_env/lib/python3.8/site-packages (from pandas->datasets==2.9.0->-r tt_metal/python_env/requirements-dev.txt (line 22)) (2.8.2)\n",
      "Collecting frozenlist>=1.1.1\n",
      "  Using cached frozenlist-1.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (240 kB)\n",
      "Collecting async-timeout<5.0,>=4.0; python_version < \"3.11\"\n",
      "  Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)\n",
      "Collecting aiosignal>=1.1.2\n",
      "  Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)\n",
      "Collecting yarl<2.0,>=1.0\n",
      "  Using cached yarl-1.9.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (308 kB)\n",
      "Collecting multidict<7.0,>=4.5\n",
      "  Using cached multidict-6.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)\n",
      "Requirement already satisfied: cffi>=1.0 in ./build/python_env/lib/python3.8/site-packages (from soundfile>=0.12.1->librosa==0.10.0->-r tt_metal/python_env/requirements-dev.txt (line 30)) (1.16.0)\n",
      "Collecting threadpoolctl>=2.0.0\n",
      "  Using cached threadpoolctl-3.2.0-py3-none-any.whl (15 kB)\n",
      "Collecting smmap<6,>=3.0.1\n",
      "  Using cached smmap-5.0.1-py3-none-any.whl (24 kB)\n",
      "Requirement already satisfied: contourpy>=1.0.1 in ./build/python_env/lib/python3.8/site-packages (from matplotlib->bert-score==0.3.12->-r tt_metal/python_env/requirements-dev.txt (line 43)) (1.1.1)\n",
      "Requirement already satisfied: kiwisolver>=1.0.1 in ./build/python_env/lib/python3.8/site-packages (from matplotlib->bert-score==0.3.12->-r tt_metal/python_env/requirements-dev.txt (line 43)) (1.4.5)\n",
      "Requirement already satisfied: pyparsing>=2.3.1 in ./build/python_env/lib/python3.8/site-packages (from matplotlib->bert-score==0.3.12->-r tt_metal/python_env/requirements-dev.txt (line 43)) (3.1.1)\n",
      "Requirement already satisfied: fonttools>=4.22.0 in ./build/python_env/lib/python3.8/site-packages (from matplotlib->bert-score==0.3.12->-r tt_metal/python_env/requirements-dev.txt (line 43)) (4.48.1)\n",
      "Requirement already satisfied: cycler>=0.10 in ./build/python_env/lib/python3.8/site-packages (from matplotlib->bert-score==0.3.12->-r tt_metal/python_env/requirements-dev.txt (line 43)) (0.12.1)\n",
      "Requirement already satisfied: mdurl~=0.1 in ./build/python_env/lib/python3.8/site-packages (from markdown-it-py<3.0.0,>=2.2.0->rich>=12.0.0->twine==4.0.2->-r tt_metal/python_env/requirements-dev.txt (line 12)) (0.1.2)\n",
      "Collecting cryptography>=2.0\n",
      "  Using cached cryptography-42.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB)\n",
      "Collecting more-itertools\n",
      "  Using cached more_itertools-10.2.0-py3-none-any.whl (57 kB)\n",
      "Requirement already satisfied: webencodings>=0.4 in ./build/python_env/lib/python3.8/site-packages (from tinycss2->nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (0.5.1)\n",
      "Requirement already satisfied: jupyter-client>=6.1.12 in ./build/python_env/lib/python3.8/site-packages (from nbclient>=0.5.0->nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (8.6.0)\n",
      "Requirement already satisfied: soupsieve>1.2 in ./build/python_env/lib/python3.8/site-packages (from beautifulsoup4->nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (2.5)\n",
      "Requirement already satisfied: pkgutil-resolve-name>=1.3.10; python_version < \"3.9\" in ./build/python_env/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (1.3.10)\n",
      "Requirement already satisfied: referencing>=0.28.4 in ./build/python_env/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (0.33.0)\n",
      "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in ./build/python_env/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (2023.12.1)\n",
      "Requirement already satisfied: rpds-py>=0.7.1 in ./build/python_env/lib/python3.8/site-packages (from jsonschema>=2.6->nbformat->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (0.17.1)\n",
      "Requirement already satisfied: pycparser in ./build/python_env/lib/python3.8/site-packages (from cffi>=1.0->soundfile>=0.12.1->librosa==0.10.0->-r tt_metal/python_env/requirements-dev.txt (line 30)) (2.21)\n",
      "Requirement already satisfied: pyzmq>=23.0 in ./build/python_env/lib/python3.8/site-packages (from jupyter-client>=6.1.12->nbclient>=0.5.0->nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (25.1.2)\n",
      "Requirement already satisfied: tornado>=6.2 in ./build/python_env/lib/python3.8/site-packages (from jupyter-client>=6.1.12->nbclient>=0.5.0->nbconvert!=5.4->nbsphinx==0.9.3->-r tt_metal/python_env/../../docs/requirements-docs.txt (line 7)) (6.4)\n",
      "Installing collected packages: platformdirs, nodeenv, cfgv, identify, distlib, filelock, virtualenv, pre-commit, pathspec, mypy-extensions, black, pyproject-hooks, build, nh3, docutils, readme-renderer, pkginfo, requests-toolbelt, jeepney, cryptography, SecretStorage, more-itertools, jaraco.classes, keyring, rfc3986, twine, yamllint, imagesize, sphinxcontrib-serializinghtml, sphinxcontrib-jsmath, snowballstemmer, sphinxcontrib-htmlhelp, alabaster, sphinxcontrib-applehelp, sphinxcontrib-devhelp, sphinxcontrib-qthelp, sphinx, sphinxcontrib-jquery, sphinx-rtd-theme, lxml, sphinxcontrib-email, breathe, nbsphinx, ply, plumbum, pandoc, iniconfig, pluggy, pytest, pytest-timeout, editorconfig, jsbeautifier, responses, dill, multiprocess, pyarrow, xxhash, tqdm, fsspec, huggingface-hub, frozenlist, async-timeout, aiosignal, multidict, yarl, aiohttp, datasets, torchvision, tokenizers, regex, transformers, xlsxwriter, tiktoken, sentencepiece, llvmlite, numba, soxr, soundfile, pooch, lazy-loader, scipy, joblib, audioread, threadpoolctl, scikit-learn, msgpack, librosa, timm, opencv-python-headless, diffusers, accelerate, ftfy, smmap, gitdb, gitpython, einops, evaluate, bert-score\n",
      "  Attempting uninstall: platformdirs\n",
      "    Found existing installation: platformdirs 4.2.0\n",
      "    Uninstalling platformdirs-4.2.0:\n",
      "      Successfully uninstalled platformdirs-4.2.0\n",
      "Successfully installed SecretStorage-3.3.3 accelerate-0.19.0 aiohttp-3.9.3 aiosignal-1.3.1 alabaster-0.7.13 async-timeout-4.0.3 audioread-3.0.1 bert-score-0.3.12 black-23.10.1 breathe-4.35.0 build-0.10.0 cfgv-3.4.0 cryptography-42.0.2 datasets-2.9.0 diffusers-0.12.1 dill-0.3.6 distlib-0.3.8 docutils-0.18.1 editorconfig-0.12.3 einops-0.6.1 evaluate-0.4.0 filelock-3.13.1 frozenlist-1.4.1 fsspec-2023.9.2 ftfy-6.1.1 gitdb-4.0.11 gitpython-3.1.32 huggingface-hub-0.20.3 identify-2.5.33 imagesize-1.4.1 iniconfig-2.0.0 jaraco.classes-3.3.1 jeepney-0.8.0 joblib-1.3.2 jsbeautifier-1.14.7 keyring-24.3.0 lazy-loader-0.3 librosa-0.10.0 llvmlite-0.39.1 lxml-4.9.4 more-itertools-10.2.0 msgpack-1.0.7 multidict-6.0.5 multiprocess-0.70.14 mypy-extensions-1.0.0 nbsphinx-0.9.3 nh3-0.2.15 nodeenv-1.8.0 numba-0.56.4 opencv-python-headless-4.8.0.74 pandoc-2.3 pathspec-0.12.1 pkginfo-1.9.6 platformdirs-3.11.0 pluggy-1.4.0 plumbum-1.8.2 ply-3.11 pooch-1.8.0 pre-commit-3.0.4 pyarrow-15.0.0 pyproject-hooks-1.0.0 pytest-7.2.2 pytest-timeout-2.2.0 readme-renderer-42.0 regex-2023.12.25 requests-toolbelt-1.0.0 responses-0.18.0 rfc3986-2.0.0 scikit-learn-1.3.2 scipy-1.10.1 sentencepiece-0.1.97 smmap-5.0.1 snowballstemmer-2.2.0 soundfile-0.12.1 soxr-0.3.7 sphinx-7.1.2 sphinx-rtd-theme-1.3.0 sphinxcontrib-applehelp-1.0.4 sphinxcontrib-devhelp-1.0.2 sphinxcontrib-email-0.3.5 sphinxcontrib-htmlhelp-2.0.1 sphinxcontrib-jquery-4.1 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.3 sphinxcontrib-serializinghtml-1.1.5 threadpoolctl-3.2.0 tiktoken-0.3.3 timm-0.6.13 tokenizers-0.13.3 torchvision-0.14.1+cpu tqdm-4.65.0 transformers-4.28.1 twine-4.0.2 virtualenv-20.25.0 xlsxwriter-3.0.8 xxhash-3.4.1 yamllint-1.32.0 yarl-1.9.4\n",
      "Installing editable dev version of ttnn package...\n",
      "pre-commit installed at .git/hooks/pre-commit\n",
      "pre-commit installed at .git/hooks/commit-msg\n",
      "Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu\n",
      "Obtaining file:///home/ubuntu/git/tt-metal/ttnn\n",
      "Installing collected packages: ttnn\n",
      "  Running setup.py develop for ttnn\n",
      "Successfully installed ttnn\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd $TT_METAL_HOME\n",
    "unset SILENT\n",
    "make nuke\n",
    "build_metal.sh --enable-profiler\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d10894e7-f8bd-4465-9f9a-f5f853974c6e",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-02-09 02:39:39.373 | INFO     | __main__:main:68 - Profiler build flag is set\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[38;2;000;128;000m                 Always\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Device profiling detected, logs folder location changed to generated/profiler/.logs//ops_device\n",
      "\u001b[1m============================= test session starts ==============================\u001b[0m\n",
      "platform linux -- Python 3.8.10, pytest-7.2.2, pluggy-1.4.0 -- /home/ubuntu/git/tt-metal/build/python_env/bin/python\n",
      "cachedir: .pytest_cache\n",
      "rootdir: /home/ubuntu/git/tt-metal, configfile: pytest.ini\n",
      "plugins: anyio-4.2.0, dash-2.8.1, timeout-2.2.0\n",
      "timeout: 600.0s\n",
      "timeout method: signal\n",
      "timeout func_only: False\n",
      "\u001b[1mcollecting ... \u001b[0mcollected 1 item\n",
      "\n",
      "tests/ttnn/integration_tests/t5/test_performance.py::test_t5_for_conditional_generation[functional_t5=models.experimental.functional_t5.tt.ttnn_functional_t5-sequence_size=64-batch_size=8-model_name=t5-small] \u001b[38;2;000;128;000m                  Metal\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Initializing device 0\n",
      "\u001b[38;2;000;128;000m                 Device\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Opening user mode device driver\n",
      "\u001b[32m2024-02-09 02:39:43.670\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - Detected 1 PCI device : {0}\n",
      "\u001b[32m2024-02-09 02:39:43.681\u001b[0m | \u001b[1m\u001b[38;2;255;165;000mWARNING \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - init_detect_tt_device_numanodes(): Could not determine NumaNodeSet for TT device (physical_device_id: 0 pci_bus_id: 0000:00:08.0)\n",
      "\u001b[32m2024-02-09 02:39:43.681\u001b[0m | \u001b[1m\u001b[38;2;255;165;000mWARNING \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - Could not find NumaNodeSet for TT Device (physical_device_id: 0 pci_bus_id: 0000:00:08.0)\n",
      "\u001b[32m2024-02-09 02:39:43.684\u001b[0m | \u001b[1m\u001b[38;2;255;165;000mWARNING \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - bind_area_memory_nodeset(): Unable to determine TT Device to NumaNode mapping for physical_device_id: 0. Skipping membind.\n",
      "\u001b[0;33m---- ttSiliconDevice::init_hugepage: bind_area_to_memory_nodeset() failed (physical_device_id: 0 ch: 0). Hugepage allocation is not on NumaNode matching TT Device. Side-Effect is decreased Device->Host perf (Issue #893).\n",
      "\u001b[0m\u001b[38;2;000;128;000m                  Metal\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | AI CLK for device 0 is:   1202 MHz\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher log file: /home/ubuntu/git/tt-metal/built/watcher.log\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher attached device 0\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher thread watching...\n",
      "\u001b[38;2;000;128;000m                     Op\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Program Cache: enabled.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-02-09 02:39:45.109 | INFO     | ttnn.model_preprocessing:preprocess_model:465 - Saving model weights to cache: /home/ubuntu/.cache/ttnn/models/ttnn_t5-small (version \"6ba823894\")\n",
      "2024-02-09 02:39:48.149 | INFO     | ttnn.model_preprocessing:preprocess_model:484 - Saved model weights to cache: /home/ubuntu/.cache/ttnn/models/ttnn_t5-small (version \"6ba823894\")\n",
      "2024-02-09 02:39:48.149 | INFO     | ttnn.model_preprocessing:preprocess_model:487 - Moving model weights to device\n",
      "2024-02-09 02:39:48.216 | INFO     | ttnn.model_preprocessing:preprocess_model:489 - Moved model weights to device\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher checking device 0\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher checking device 0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-02-09 02:40:39.721 | INFO     | tests.ttnn.integration_tests.t5.test_performance:test_t5_for_conditional_generation:100 - Compile time: 15.359902381896973\n",
      "2024-02-09 02:40:39.721 | INFO     | tests.ttnn.integration_tests.t5.test_performance:test_t5_for_conditional_generation:101 - Inference time: 18.07123565673828\n",
      "2024-02-09 02:40:39.722 | INFO     | tests.ttnn.integration_tests.t5.test_performance:test_t5_for_conditional_generation:102 - Tokens per second: 0.44269247283137575\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[32mPASSED\u001b[0m\u001b[38;2;000;128;000m                  Metal\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Closing device 0\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher detached device 0\n",
      "\u001b[38;2;000;128;000m                     Op\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Program Cache: disabled and cleared.\n",
      "\n",
      "\n",
      "==================================== PASSES ====================================\n",
      "\u001b[36m\u001b[1m=========================== short test summary info ============================\u001b[0m\n",
      "\u001b[32mPASSED\u001b[0m tests/ttnn/integration_tests/t5/test_performance.py::\u001b[1mtest_t5_for_conditional_generation[functional_t5=models.experimental.functional_t5.tt.ttnn_functional_t5-sequence_size=64-batch_size=8-model_name=t5-small]\u001b[0m\n",
      "\u001b[32m============================== \u001b[32m\u001b[1m1 passed\u001b[0m\u001b[32m in 56.44s\u001b[0m\u001b[32m ==============================\u001b[0m\n",
      "\u001b[38;2;000;128;000m                 Device\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Closing user mode device drivers\n",
      "\u001b[1m============================= test session starts ==============================\u001b[0m\n",
      "platform linux -- Python 3.8.10, pytest-7.2.2, pluggy-1.4.0 -- /home/ubuntu/git/tt-metal/build/python_env/bin/python\n",
      "cachedir: .pytest_cache\n",
      "rootdir: /home/ubuntu/git/tt-metal, configfile: pytest.ini\n",
      "plugins: anyio-4.2.0, dash-2.8.1, timeout-2.2.0\n",
      "timeout: 600.0s\n",
      "timeout method: signal\n",
      "timeout func_only: False\n",
      "\u001b[1mcollecting ... \u001b[0mcollected 1 item\n",
      "\n",
      "tests/ttnn/integration_tests/t5/test_performance.py::test_t5_for_conditional_generation[functional_t5=models.experimental.functional_t5.tt.ttnn_functional_t5-sequence_size=64-batch_size=8-model_name=t5-small] \u001b[38;2;000;128;000m                  Metal\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Initializing device 0\n",
      "\u001b[38;2;000;128;000m                 Device\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Opening user mode device driver\n",
      "\u001b[32m2024-02-09 02:40:44.627\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - Detected 1 PCI device : {0}\n",
      "\u001b[32m2024-02-09 02:40:44.638\u001b[0m | \u001b[1m\u001b[38;2;255;165;000mWARNING \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - init_detect_tt_device_numanodes(): Could not determine NumaNodeSet for TT device (physical_device_id: 0 pci_bus_id: 0000:00:08.0)\n",
      "\u001b[32m2024-02-09 02:40:44.638\u001b[0m | \u001b[1m\u001b[38;2;255;165;000mWARNING \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - Could not find NumaNodeSet for TT Device (physical_device_id: 0 pci_bus_id: 0000:00:08.0)\n",
      "\u001b[32m2024-02-09 02:40:44.639\u001b[0m | \u001b[1m\u001b[38;2;255;165;000mWARNING \u001b[0m | \u001b[36mSiliconDriver  \u001b[0m - bind_area_memory_nodeset(): Unable to determine TT Device to NumaNode mapping for physical_device_id: 0. Skipping membind.\n",
      "\u001b[0;33m---- ttSiliconDevice::init_hugepage: bind_area_to_memory_nodeset() failed (physical_device_id: 0 ch: 0). Hugepage allocation is not on NumaNode matching TT Device. Side-Effect is decreased Device->Host perf (Issue #893).\n",
      "\u001b[0m\u001b[38;2;000;128;000m                  Metal\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | AI CLK for device 0 is:   1202 MHz\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher log file: /home/ubuntu/git/tt-metal/built/watcher.log\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher attached device 0\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher thread watching...\n",
      "\u001b[38;2;000;128;000m                     Op\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Program Cache: enabled.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-02-09 02:40:46.109 | INFO     | ttnn.model_preprocessing:preprocess_model:458 - Loading model weights from cache: /home/ubuntu/.cache/ttnn/models/ttnn_t5-small  (version \"6ba823894\")\n",
      "2024-02-09 02:40:46.224 | INFO     | ttnn.model_preprocessing:preprocess_model:460 - Loaded model weights from cache: /home/ubuntu/.cache/ttnn/models/ttnn_t5-small  (version \"6ba823894\")\n",
      "2024-02-09 02:40:46.224 | INFO     | ttnn.model_preprocessing:preprocess_model:487 - Moving model weights to device\n",
      "2024-02-09 02:40:46.292 | INFO     | ttnn.model_preprocessing:preprocess_model:489 - Moved model weights to device\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher checking device 0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-02-09 02:41:08.164 | INFO     | tests.ttnn.integration_tests.t5.test_performance:test_t5_for_conditional_generation:100 - Compile time: 15.22393798828125\n",
      "2024-02-09 02:41:08.165 | INFO     | tests.ttnn.integration_tests.t5.test_performance:test_t5_for_conditional_generation:101 - Inference time: 3.322504758834839\n",
      "2024-02-09 02:41:08.165 | INFO     | tests.ttnn.integration_tests.t5.test_performance:test_t5_for_conditional_generation:102 - Tokens per second: 2.407821983919596\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[32mPASSED\u001b[0m\u001b[38;2;000;128;000m                  Metal\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Closing device 0\n",
      "\u001b[38;2;000;128;000m              LLRuntime\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Watcher detached device 0\n",
      "\u001b[38;2;000;128;000m                     Op\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Program Cache: disabled and cleared.\n",
      "\n",
      "\n",
      "==================================== PASSES ====================================\n",
      "\u001b[36m\u001b[1m=========================== short test summary info ============================\u001b[0m\n",
      "\u001b[32mPASSED\u001b[0m tests/ttnn/integration_tests/t5/test_performance.py::\u001b[1mtest_t5_for_conditional_generation[functional_t5=models.experimental.functional_t5.tt.ttnn_functional_t5-sequence_size=64-batch_size=8-model_name=t5-small]\u001b[0m\n",
      "\u001b[32m============================== \u001b[32m\u001b[1m1 passed\u001b[0m\u001b[32m in 23.91s\u001b[0m\u001b[32m ==============================\u001b[0m\n",
      "\u001b[38;2;000;128;000m                 Device\u001b[0m | \u001b[1m\u001b[38;2;100;149;237mINFO    \u001b[0m | Closing user mode device drivers\n"
     ]
    }
   ],
   "source": [
    "%%bash\n",
    "cd $TT_METAL_HOME\n",
    "./tt_metal/tools/profiler/profile_this.py -n t5 -c \"pytest tests/ttnn/integration_tests/t5/test_performance.py::test_t5_for_conditional_generation[functional_t5=models.experimental.functional_t5.tt.ttnn_functional_t5-sequence_size=64-batch_size=8-model_name=t5-small]\"\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "dbd63fbb-f61c-48a4-85a8-1003586be3fc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found /home/ubuntu/git/tt-metal/generated/profiler/reports/resnet/ops/2024_02_09_01_38_37/ops_perf_results_resnet_2024_02_09_01_38_37.csv\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>OP CODE</th>\n",
       "      <th>OP TYPE</th>\n",
       "      <th>GLOBAL CALL COUNT</th>\n",
       "      <th>ATTRIBUTES</th>\n",
       "      <th>MATH FIDELITY</th>\n",
       "      <th>CORE COUNT</th>\n",
       "      <th>PARALLELIZATION STRATEGY</th>\n",
       "      <th>HOST START TS</th>\n",
       "      <th>HOST END TS</th>\n",
       "      <th>HOST DURATION [ns]</th>\n",
       "      <th>...</th>\n",
       "      <th>OUTPUT_0_W</th>\n",
       "      <th>OUTPUT_0_Z</th>\n",
       "      <th>OUTPUT_0_Y</th>\n",
       "      <th>OUTPUT_0_X</th>\n",
       "      <th>OUTPUT_0_LAYOUT</th>\n",
       "      <th>OUTPUT_0_DATA TYPE</th>\n",
       "      <th>OUTPUT_0_MEMORY</th>\n",
       "      <th>CALL DEPTH</th>\n",
       "      <th>CompileProgram 0 Count</th>\n",
       "      <th>CompileProgram 0 Average [ns]</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>ttnn.load_tensor_ttnn.load_tensor</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137428381893955</td>\n",
       "      <td>137428382188762</td>\n",
       "      <td>294807</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ttnn.load_tensor_ttnn.load_tensor</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137428382500949</td>\n",
       "      <td>137428399402163</td>\n",
       "      <td>16901214</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>ttnn.load_tensor_ttnn.load_tensor</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>3</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137428399802068</td>\n",
       "      <td>137428399873758</td>\n",
       "      <td>71690</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>ttnn.load_tensor_ttnn.load_tensor</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>4</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137428400102635</td>\n",
       "      <td>137428400351033</td>\n",
       "      <td>248398</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>ttnn.load_tensor_ttnn.load_tensor</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>5</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137428400548071</td>\n",
       "      <td>137428400792528</td>\n",
       "      <td>244457</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4391</th>\n",
       "      <td>ttnn.reshape_ttnn.reshape</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>4392</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137450414555424</td>\n",
       "      <td>137450414599894</td>\n",
       "      <td>44470</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4392</th>\n",
       "      <td>ttnn.reshape_ttnn.reshape</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>4393</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137450414740752</td>\n",
       "      <td>137450414782422</td>\n",
       "      <td>41670</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4393</th>\n",
       "      <td>Matmul</td>\n",
       "      <td>tt_dnn_device</td>\n",
       "      <td>4394</td>\n",
       "      <td>(bcast_batch=true; output_mem_config=tt::tt_me...</td>\n",
       "      <td>HiFi4-HiFi4</td>\n",
       "      <td>108</td>\n",
       "      <td>MatmulParallelizationStrategy::MULTI_CORE</td>\n",
       "      <td>137450414881851</td>\n",
       "      <td>137450414983440</td>\n",
       "      <td>101589</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>64</td>\n",
       "      <td>32128</td>\n",
       "      <td>TILE</td>\n",
       "      <td>BFLOAT16</td>\n",
       "      <td>DEV_0_DRAM_INTERLEAVED</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4394</th>\n",
       "      <td>ttnn.reshape_ttnn.reshape</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>4395</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137450415113099</td>\n",
       "      <td>137450415158748</td>\n",
       "      <td>45649</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4395</th>\n",
       "      <td>ttnn.from_device_ttnn.from_device</td>\n",
       "      <td>python_fallback</td>\n",
       "      <td>4396</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-</td>\n",
       "      <td>NaN</td>\n",
       "      <td>137450415235897</td>\n",
       "      <td>137450453493048</td>\n",
       "      <td>38257151</td>\n",
       "      <td>...</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>-</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4396 rows × 44 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                 OP CODE          OP TYPE  GLOBAL CALL COUNT  \\\n",
       "0      ttnn.load_tensor_ttnn.load_tensor  python_fallback                  1   \n",
       "1      ttnn.load_tensor_ttnn.load_tensor  python_fallback                  2   \n",
       "2      ttnn.load_tensor_ttnn.load_tensor  python_fallback                  3   \n",
       "3      ttnn.load_tensor_ttnn.load_tensor  python_fallback                  4   \n",
       "4      ttnn.load_tensor_ttnn.load_tensor  python_fallback                  5   \n",
       "...                                  ...              ...                ...   \n",
       "4391           ttnn.reshape_ttnn.reshape  python_fallback               4392   \n",
       "4392           ttnn.reshape_ttnn.reshape  python_fallback               4393   \n",
       "4393                              Matmul    tt_dnn_device               4394   \n",
       "4394           ttnn.reshape_ttnn.reshape  python_fallback               4395   \n",
       "4395   ttnn.from_device_ttnn.from_device  python_fallback               4396   \n",
       "\n",
       "                                             ATTRIBUTES MATH FIDELITY  \\\n",
       "0                                                   NaN           NaN   \n",
       "1                                                   NaN           NaN   \n",
       "2                                                   NaN           NaN   \n",
       "3                                                   NaN           NaN   \n",
       "4                                                   NaN           NaN   \n",
       "...                                                 ...           ...   \n",
       "4391                                                NaN           NaN   \n",
       "4392                                                NaN           NaN   \n",
       "4393  (bcast_batch=true; output_mem_config=tt::tt_me...   HiFi4-HiFi4   \n",
       "4394                                                NaN           NaN   \n",
       "4395                                                NaN           NaN   \n",
       "\n",
       "     CORE COUNT                   PARALLELIZATION STRATEGY    HOST START TS  \\\n",
       "0             -                                        NaN  137428381893955   \n",
       "1             -                                        NaN  137428382500949   \n",
       "2             -                                        NaN  137428399802068   \n",
       "3             -                                        NaN  137428400102635   \n",
       "4             -                                        NaN  137428400548071   \n",
       "...         ...                                        ...              ...   \n",
       "4391          -                                        NaN  137450414555424   \n",
       "4392          -                                        NaN  137450414740752   \n",
       "4393        108  MatmulParallelizationStrategy::MULTI_CORE  137450414881851   \n",
       "4394          -                                        NaN  137450415113099   \n",
       "4395          -                                        NaN  137450415235897   \n",
       "\n",
       "          HOST END TS  HOST DURATION [ns]  ... OUTPUT_0_W OUTPUT_0_Z  \\\n",
       "0     137428382188762              294807  ...          -          -   \n",
       "1     137428399402163            16901214  ...          -          -   \n",
       "2     137428399873758               71690  ...          -          -   \n",
       "3     137428400351033              248398  ...          -          -   \n",
       "4     137428400792528              244457  ...          -          -   \n",
       "...               ...                 ...  ...        ...        ...   \n",
       "4391  137450414599894               44470  ...          -          -   \n",
       "4392  137450414782422               41670  ...          -          -   \n",
       "4393  137450414983440              101589  ...          1          8   \n",
       "4394  137450415158748               45649  ...          -          -   \n",
       "4395  137450453493048            38257151  ...          -          -   \n",
       "\n",
       "     OUTPUT_0_Y OUTPUT_0_X OUTPUT_0_LAYOUT OUTPUT_0_DATA TYPE  \\\n",
       "0             -          -               -                  -   \n",
       "1             -          -               -                  -   \n",
       "2             -          -               -                  -   \n",
       "3             -          -               -                  -   \n",
       "4             -          -               -                  -   \n",
       "...         ...        ...             ...                ...   \n",
       "4391          -          -               -                  -   \n",
       "4392          -          -               -                  -   \n",
       "4393         64      32128            TILE           BFLOAT16   \n",
       "4394          -          -               -                  -   \n",
       "4395          -          -               -                  -   \n",
       "\n",
       "             OUTPUT_0_MEMORY CALL DEPTH CompileProgram 0 Count  \\\n",
       "0                          -          1                      0   \n",
       "1                          -          1                      0   \n",
       "2                          -          1                      0   \n",
       "3                          -          1                      0   \n",
       "4                          -          1                      0   \n",
       "...                      ...        ...                    ...   \n",
       "4391                       -          1                      0   \n",
       "4392                       -          1                      0   \n",
       "4393  DEV_0_DRAM_INTERLEAVED          1                      0   \n",
       "4394                       -          1                      0   \n",
       "4395                       -          1                      0   \n",
       "\n",
       "     CompileProgram 0 Average [ns]  \n",
       "0                                0  \n",
       "1                                0  \n",
       "2                                0  \n",
       "3                                0  \n",
       "4                                0  \n",
       "...                            ...  \n",
       "4391                             0  \n",
       "4392                             0  \n",
       "4393                             0  \n",
       "4394                             0  \n",
       "4395                             0  \n",
       "\n",
       "[4396 rows x 44 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import os\n",
    "import glob\n",
    "\n",
    "TT_METAL_HOME = os.getenv('TT_METAL_HOME')\n",
    "\n",
    "def get_latest_report(base_path):\n",
    "    try:\n",
    "        latest_dir = max([os.path.join(base_path, d) for d in os.listdir(base_path) if os.path.isdir(os.path.join(base_path, d))], key=os.path.getmtime)\n",
    "        return max(glob.glob(os.path.join(latest_dir, '*')), key=os.path.getmtime)\n",
    "    except ValueError:\n",
    "        return None\n",
    "\n",
    "latest_profile_report = get_latest_report(f'{TT_METAL_HOME}/generated/profiler/reports/t5/ops/')\n",
    "print(f'Found {latest_profile_report}')\n",
    "\n",
    "df = pd.read_csv(latest_profile_report)\n",
    "df\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "851dc98a-81be-42b6-aea1-226ee3bd20d3",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
